package com.zst.rabbitmq.monitor.dto;

import com.alibaba.fastjson.JSONObject;

public class Node {
    /** 节点名称 */
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static Node map(String json) {
        if (json == null) {
            return null;
        }

        Node dto = new Node();
        JSONObject jo = JSONObject.parseObject(json);
        dto.setName(jo.getString("node"));

        return dto;
    }
}
